﻿<%<hi:common_new_header runat="server" skinname="/ascx/JsNewTags/Skin-Common_New_Header.ascx" />%>
<form runat="server" id="form1">
    <link href="http://res.juseshop.com/templates/master/jusekeji/style/User_Personal.css" rel="stylesheet" />
    <link href="http://res.juseshop.com/templates/master/jusekeji/style/style.css" rel="stylesheet" />
    <script src="http://res.juseshop.com/utility/common.js" type="text/javascript"></script>
    <script src="http://res.juseshop.com/utility/globals.js" type="text/javascript"></script>
    <script src="http://res.juseshop.com/utility/jquery.artdialog.js" type="text/javascript"></script>
    <script src="http://res.juseshop.com/utility/iframeTools.js" type="text/javascript"></script>
    <script src="http://res.juseshop.com/utility/Window.js" type="text/javascript"></script>
    <link rel="stylesheet" href="http://res.juseshop.com/utility/skins/blue.css" />
    <div class="advice clearfix">
        <div class="advice_nav clearfix"><p><hi:siteurl urlname="user_UserCenter" runat="server" class="advice_nav_one">用户中心</hi:siteurl>><hi:siteurl urlname="user_UserOrders" runat="server">订单中心</hi:siteurl>>我的订单</p></div>
        <div class="advice_left clearfix">
            <hi:wnxd_user_menu runat="server" />
        </div>

        <div id="pay_div" style="display: none">
            <div class="frame-content" style="width:300px; overflow:hidden;">
                <p style="line-height:21px;">
                    1.再次确认您选择的支付方式，您也可以重新选择。
                </p>
                <p style="color: #cc0000; line-height: 21px;">
                    <span class="frame-span frame-input130"><em>*</em>&nbsp;确认支付方式：</span> <span>
                        <abbr class="formselect">
                            <%<asp:DropDownList id="dropPayType" runat="server" />%>
                        </abbr>
                    </span>
                </p>
            </div>
        </div>

        <div style="display: none">
            <input type="hidden" id="hdorderId" runat="server" />
            <%<asp:Button ID="btnPay" OnClientClick="this.form.target='_blank'" runat="server" Text="确 定" CssClass="submit_DAqueding" />%>
        </div>

        <div class="return_right clearfix">
            <!--<div class="order_right_top clearfix">
                <input name="" type="text" value="&nbsp;&nbsp;输入商品标题或订单号进行搜索">
                <a href="#">订单搜索</a>

            </div>-->
            
            <%<hi:userordermanage_orderlist runat="server" />%>

        </div>
        <script>
            function paySelect(obj) {
                type = "pay";
                setArryText('UserOrders_hdorderId', $(obj).attr("oId"));

                ////支付宝的问题-正常后需去掉
                //if ($(obj).attr("pId") == "2") {
                //    $(obj).attr("pId", "7");
                //}
                if ($(obj).attr("pId") == "1") {
                    $(obj).attr("pId", "7");
                }

                $("#UserOrders_dropPayType").val($(obj).attr("pId"));
                setArryText('UserOrders_dropPayType', $(obj).attr("pId"));
                wnxd_DialogShow("确认支付方式", "payselect", "pay_div", "UserOrders_btnpPay");
                return false;
            }
            function validatorForm() {
                var type = "";
                if (type == "pay") {
                    if ($("#UserOrders_dropPayType").val() == "") {
                        alert("请选择支付方式");
                        return false;
                    }
                }
                return true;
            }
            ////支付宝的问题-正常后需去掉
            //$(function () {
            //    $("#UserOrders_dropPayType option[value=2]").hide();
            //});
            $(function () {
                $("#UserOrders_dropPayType option[value=1]").hide();
            })
            function wnxd_DialogShow(hishop_titile, hishop_id, hishop_div, btnId) {
                dialog = art.dialog({
                    id: hishop_id,
                    title: hishop_titile,
                    content: $("#" + hishop_div).html(),
                    init: function () {
                        if (arrytext != null) {
                            getArryText(arrytext);
                        }
                    },
                    resize: true,
                    fixed: true,
                    close: function () {
                        arrytext = null;
                    },
                    button: [{
                        name: '确 认', callback: function () {
                            var istag = validatorForm();
                            if (istag) {
                                var temparrytext = arrytext;
                                if (temparrytext != null) {
                                    setShowText(temparrytext);
                                    this.close();
                                    getArryText(temparrytext);
                                    var type = $("#UserOrders_dropPayType").val(),
                                        orderId = $("#UserOrders_hdorderId").val();
                                    $.post(location.href, "wnxd_Ajax=btnPay&type=" + type + "&orderid=" + orderId, function (e) {
                                        location.href = e.url;
                                    },"json")
                                }
                            } else {
                                return false;
                            }
                        }, focus: true
                    },
                            { name: '取 消' }
                    ]
                });
            }
        </script>

    </div>
    <%<hi:common_new_footer runat="server" />%>
    </form>
